package com.gduf.bbl.controller;

import com.gduf.bbl.common.utils.R;
import com.gduf.bbl.entity.SizeEntity;
import com.gduf.bbl.service.SizeService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("bbl/size")
@CrossOrigin(allowCredentials = "true")
public class SizeController {
    @Resource
    SizeService sizeService;

    @GetMapping("/list")
    public R list(){
        final List<SizeEntity> list = sizeService.list();
        return R.ok().setData(list);
    }
}
